Managing activities over time in an activity graph

ABSTRACT

Systems and processes for managing data in a data warehouse using an activity graph are described. The activity graph may include nodes representing entities (or versions thereof) interconnected by edges representing relationships (or versions thereof) between those entities. The nodes representing versions of an entity may be captured as a directed acyclic graph (DAG). New nodes and edges may be added to the activity graph as new entities and relationships are formed. As changes are made to an entity or relationship, new nodes or edges representing new versions of the entity or relationship may be created and added to the activity graph based on the entity&#39;s or relationship&#39;s tracking type. Existing nodes and edges may be removed from the activity based on data retention rules and/or data decay rules. In some examples, nodes and edges may be summarized by collapsing multiple nodes or multiple edges into a single node or edge.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Patent Application Ser. No. 61/698,518, filed Sep. 7, 2012, and U.S. patent Ser. No. 13/844,526, filed Mar. 15, 2013, the entire disclosures of which are hereby incorporated by reference in their entirety for all purposes as if put forth in full below.

BACKGROUND

1. Field

The present disclosure relates to data warehouses and, in one particular example, to improved processes for managing data warehouses.

2. Related Art

Data warehouses are large repositories that integrate data from many different sources and are commonly used to store data for purposes of reporting and data analysis. In traditional data warehousing, entities and their attributes are mapped into dimensions, where a dimension refers to a data element that categorizes each item in a data set into a non-overlapping region. For example, as applied to a sales receipt, possible dimensions may include “Customer,” “Date,” and “Product.” Dimensions provide filtering, grouping, and labeling, and are needed to slice or aggregate data in various ways (e.g. per region, per sales person, per language, per item category, etc.).

Conventional data warehouses may store various types of data, such as measures (e.g., properties in a database on which calculations can be made, such as quantity of items sold or something which changes over time), their changes over time, and dimensions of interest, in data structures called fact tables. The fact tables provide the values that act as independent variables for analyzing dimensional attributes. Dimensions in this model are constructed from the attributes of interest as well as the changes to their values over time. To manage data warehouses storing data in fact tables, various data management techniques, such as a star schema, may be used. A star schema generally refers to a simple form of a scheme in a data warehouse that includes one or more fact tables that may reference any number of dimension tables. For example, a star schema for a data warehouse may include fact tables that include a measure and the identifiers for the dimensions and the set of tables describing each dimension. While generally effective, these data warehouses are fairly difficult to modify. For example, due to the complexity of building a data warehouse, the propagation of schema change is limited as it impacts both the target repository as well as the data pipeline that has been used to construct the warehouse by integrating data from multiple sources. Additionally, when a data warehouse is used to capture changes to dimensions occurring over time, complexity increases dramatically.

As data warehouses are being used to store larger amounts of data that change over time, it is becoming increasingly important to have proper data retention mechanisms to retain relevant data while deleting or archiving older, less relevant data. In some systems, data warehouses are physically separated into partitions based on a time period (e.g. by day, month, quarter or year). A common data retention mechanism used in these systems is to simply delete older partitions. While this results in predictable data retention, it may cause older, yet relevant data, to be archived or deleted.

Improved systems and processes for managing data warehouses are desired.

SUMMARY

Processes for managing a data warehouse using an activity graph are disclosed. One example process includes accessing an activity graph comprising a plurality of interconnected nodes, wherein the plurality of interconnected nodes represent a plurality of entities; storing a new version of a first entity of the plurality of entities in the activity graph based on a change in an attribute associated with the first entity and a tracking type associated with the first entity; removing a second entity of the plurality of entities from the activity graph based on a data retention rule associated with the second entity; and removing a third entity of the plurality of entities from the activity graph based on an elapsed length of time and a data decay rule associated with the third entity.

In some examples, the activity graph further includes a plurality of edges representing a plurality of relationships between the plurality of entities represented by the plurality of interconnected nodes. In these examples, the process may further include storing a new version of a first relationship of the plurality of relationships in the activity graph based on a change in an attribute of the first relationship and a tracking type associated with the first relationship; removing a second relationship of the plurality of relationships from the activity graph based on a data retention rule associated with a node connected to an edge representing the second relationship; and removing a third relationship of the plurality of relationships from the activity graph based on an elapsed length of time and a data decay rule associated with the third relationship.

In some examples, two or more nodes of the plurality of nodes represent different versions of a fourth entity. In yet other examples, the process may further include summarizing the different versions of the fourth entity by merging the two or more nodes into a single node.

In some examples, the tracking type associated with the first entity identifies a type of attribute that causes the storing of the new version of the first entity in the activity graph. In other examples, storing the new version of the first entity in the activity graph based on the change in the attribute of the entity and the tracking type associated with the first entity may include inserting a new node representing the new version of the first entity into the activity graph if a type of the attribute is the type of attribute that causes the storing of the new version of the first entity in the activity graph.

In some examples, the data retention rule may identify a data removal condition comprising an expiration of the second entity, an expiration of all versions of the second entity, or an expiration of all edges of the second entity. In other examples, removing the second entity from the activity graph based on the data retention rule associated with the second entity comprises removing a node associated with the second entity from the activity graph in response to the occurrence of the data removal condition.

In some examples, the data decay rule comprises a threshold duration associated with the third entity. In other examples, removing the third entity from the activity graph based on the data decay rule associated with the third entity comprises removing a node associated with the third entity from the activity graph in response to the elapsed length of time exceeding the threshold duration, wherein the elapsed length of time represents a duration that the third entity has been expired.

Systems and computer-readable storage media for performing these processes are also disclosed.

BRIEF DESCRIPTION OF THE FIGURES

The present application can be best understood by reference to the following description taken in conjunction with the accompanying drawing figures, in which like parts may be referred to by like numerals.

FIG. 1 illustrates an example activity graph according to various embodiments.

FIG. 2 illustrates an example logical data model for capturing changes over time in an activity graph according to various embodiments.

FIG. 3 illustrates an example activity graph being used to capture changes over time to an entity according to various embodiments.

FIG. 4 illustrates an exemplary process for managing data in a data warehouse using an activity graph according to various embodiments.

FIG. 5 illustrates an exemplary computing system that may be used to carry out the various embodiments described herein.

DETAILED DESCRIPTION

The following description is presented to enable a person of ordinary skill in the art to make and use the various embodiments. Descriptions of specific devices, techniques, and applications are provided only as examples. Various modifications to the examples described herein will be readily apparent to those of ordinary skill in the art, and the general principles defined herein may be applied to other examples and applications without departing from the spirit and scope of the present technology. Thus, the disclosed technology is not intended to be limited to the examples described herein and shown, but is to be accorded the scope consistent with the claims.

Various examples are described below relating to managing data in a data warehouse using an activity graph. The activity graph may include nodes representing entities (or versions thereof) interconnected by edges representing relationships (or versions thereof) between those entities. The nodes representing versions of an entity may be captured as a directed acyclic graph (DAG). New nodes and edges may be added to the activity graph as new entities and relationships are formed. As changes are made to an entity or relationship, new nodes or edges representing new versions of the entity or relationship may be created and added to the activity graph based on the entity's or relationship's tracking type. Existing nodes and edges may be removed from the activity based on data retention rules and/or data decay rules. In some examples, nodes and edges may be summarized by collapsing multiple nodes or multiple edges into a single node or edge.

Activity Graph

A data warehouse may be implemented using an activity graph according to various embodiments. FIG. 1 illustrates an example activity graph 100 that includes a graph having nodes 101 connected together by edges 103. Each node 101 of the activity graph 100 may be associated with an entity (or versions thereof), such as a person, a user, a group (e.g., an organizational unit grouped by building, department, company, etc.), content (e.g., a document, an email, image, etc.), a computing resource, an activity, an event, or the like, while edges 103 may represent relationships (or versions thereof) between those entities.

In some examples, nodes 101 may be used to store information or attributes of its associated entity. For example, a node representing a person entity may store attributes, such as a name, birthday, gender, occupation, etc., of that person. By storing information and attributes of an entity in this way, the node object may be sufficiently generic to handle any type of entity without having to change the pipeline or schema of the system. For example, if a system is capable of handling PDF documents, the pipeline or schema of the system need not be changed to handle Word documents. The details that distinguish the different types of entities may be stored as attributes or information associated with the node.

In some examples, each node may further include a time period indicating the period during which that node or data associated with that node (e.g., attributes) is valid. For example, a node representing a version of a document that was created on Jan. 1, 2013, and subsequently edited on Jan. 10, 2013, may include a time period of Jan. 1, 2013-Jan. 10, 2013 indicating the period during which that document was valid. Similarly, a node may include a time period associated with individual attributes of the entity indicating the period during which that attribute is valid. In this way, the validity of the node and associated information may be stored and used for purposes of data management.

Edges 103 connecting nodes 101 may represent relationships between the nodes 101 that they connect. Edges 103 may include information about a relationship type, a direction, properties and attributes of the edge type, and the like. The direction information of the edge is based on whether the edge is directed or undirected. For example, a directed edge has a direction of outgoing or incoming, whereas an undirected edge may not have a direction. In some examples, similar to nodes 101, each edge 103 may include a time period indicating the period during which that edge is valid. Edges may further include time periods associated with information/attributes of the edge indicating the time period during which that information/attribute is valid. For example, a directed edge connecting two nodes representing employees of a company may indicate a supervisor/subordinate relationship between the employees, the time during which that relationship existed, and the like.

Since data warehouses are frequently used to store data that changes over time, activity graph 100 may be capable of storing one or more versions of an entity or one or more versions of a relationship. To support such a feature, activity graph 100 may include multiple nodes 101 representing different versions of the same entity or multiple edges representing different versions of a relationship between entities. To illustrate, FIG. 2 shows an example logical data model 200 for capturing changes over time. In this example, each version of the entity V, may be represented by a different node (203, 205, and 207) and may be versioned from a generic entity 201. In some examples, each version V_(i) may be identified as being derived from a previous version, while in other examples, the relationships between versions may not be sequential. As mentioned above, each node (e.g., version of the entity) may include information describing a time period during which that version is valid. In this way, the different versions of the entity and how to construct it from its most recent versions may be captured. The time period during which each version is valid may also be propagated to the versioned edges. Versions of relationships may similarly be tracked with the creation of new edges that include information describing a time period during which that version is valid.

To illustrate the use of an activity graph to store data that changes over time, FIG. 3 shows an example graph 300 that captures a change to an employee's legal name from “Lisa John” to “Lisa Smith” by adding a node that is connected to generic entity node 301. State node 303 may include the original state information of the employee. The original state information may be associated with a time stamp to identify when the information was added to node 303. At the time that state node 303 was generated, node 303 may include information indicating that the node is valid from Sep. 1, 2012-present. In response to Lisa John changing her name to Lisa Smith, state node 305 may be generated and may include a complete set of updated state information of the employee. The complete updated state information may be associated with a time stamp to identify when the information was added to node 305. At the time that state node 305 was generated, the information in node 303 indicating the valid period of time may change from Sep. 1, 2012-present to Sep. 1, 2012-Oct. 10, 2012. Additionally, state node 305 may include information indicating that the node is valid from Oct. 10, 2012-present. The edges of the graph shown in FIG. 3 may similarly include associated time intervals that indicate the time during which the edges are valid. In this example, the generic entity node 301 may point to the various possible versions of the state information of the employee. In another example, rather than storing a complete version of the state information of the employee, state node 305 may include a differential between the original state information stored in state node 303 and the updated state.

Identification of Tracked Entities and Relationships

As mentioned above, an entities (or versions thereof) may be stored as nodes and relationships (or versions thereof) may be stored as edges within an activity graph similar or identical to activity graph 100 or 300, described above. When a new node or edge for an entity or relationship is created, the entity or relationship may be declared to have various types of data, such as a name, collection to which it belongs, brief description, and the like, which are stored in the node or edge along with the information and attributes of the entity or relationship.

In some examples, a node or edge may include one or more programmatic annotations (e.g., Java-based annotations) that indicate how an entity or relationship is to be managed by the activity graph. For example, the annotations may indicate how versions of the entities/relationships are to be tracked, how entities/relationships are to be retained by the activity graph, how entities/relationships are to be removed from the activity graph, how entities/relationships are to be summarized within the activity graph, and the like. In some examples, the annotations may be used to initially populate the runtime metadata for managing the activity graph. However, since it is data rather than encoded into the programming as annotation (e.g., in the source code), the metadata may be changed dynamically during the life of the entities and relationships to dynamically remove/add tracking of their data retention that is reflected dynamically as changes to nodes and edges.

For example one type of annotation that may be selected when declaring an entity or relationship is a tracking type that indicates whether or not changes to that entity or relationship should be tracked as well as the specific types of changes that trigger the creation of a new version of the entity or relationship. In other words, the tracking type annotation may include an identification of the attributes to be tracked and to which changes result in the creation of a new version node or edge in the activity graph. The specific tracking type may be individually selected for each entity or relationship. For example, a node representing a work address may include attributes, such as a street number, street name, city, and state. The node may further include an annotation that identifies the city and state attributes as being the only attributes that trigger the creation of a new version of the work address. Thus, in this example, a change from Bellevue, Wash. to San Jose, Calif. would trigger a new version of the work address, while transferring to a different street within Bellevue, Wash. would not trigger the creation of a new version of the address.

In some examples, the tracking types for entities and relationships may include no tracking, track all attributes, and track selective attributes. The no tracking annotation may indicate that change tracking should not be performed for that entity or relationship. In other words, no version changes should be tracked by the activity graph. For instance, referring to the example shown in FIG. 3, when the legal name attribute is changed from “Lisa John” to “Lisa Smith,” the system may not generate the new node 305 representing a new version of Lisa. Instead, the change may be made directly to node 303. Additionally, any change to any other attribute may not trigger the creation and insertion of another node into the activity graph since the no tracking annotation has been selected. However, if the entity is referenced via a relationship, a generic entity may be created. Similarly, any change to any attribute of a relationship may not trigger the creation and insertion of another edge into the activity graph if the no tracking annotation has been selected.

The track all attributes annotation may indicate that any attribute change of the entity may trigger the creation of a new version of the entity or relationship. For instance, referring to the example shown in FIG. 3, when the legal name attribute is changed from “Lisa John” to “Lisa Smith,” the system may generate the new node 305 representing a new version of Lisa. This new version may be created since the attribute “legal name” was changed. The system may similarly generate new versions of this user entity in response to a change in any other attribute, such as occupation, citizenship, residence, etc. Similarly, any change to any attribute of a relationship may trigger the creation and insertion of another edge into the activity graph if the track all attributes annotation has been selected. In some examples, this annotation may be limited to changes of user-visible attributes. That is, system maintained attributes, such as the last updated date, may not be tracked and may not cause the creation of new nodes or edges.

The track selective attributes annotation indicates that one or more attributes of the entity or relationship should be tracked and that new versions of the entity or relationship should be generated in response to such a change. For instance, referring to the example shown in FIG. 3, if a track selection attributes annotation is selected for a user entity and “legal name” is selected as one of the attributes to be tracked, the system may generate the new node 305 representing a new version of Lisa in response to the changing of Lisa's legal name from “Lisa John” to “Lisa Smith.” However, changes to other attributes of the user (e.g., occupation, citizenship, residence, etc.) may not trigger the new version if these attributes were not selected as attributes to be tracked. Similarly, the track selective attributes annotation may be selected to indicate that changes to specific attributes of a relationship may trigger the creation and insertion of another edge into the activity graph, while changes to other attributes of the relationship should not trigger the creation of new edges.

Using the tracking types discussed above, a user or administrator may configure the types of changes that may be tracked for different entities and relationships. This may be beneficial since certain changes may be important for one type of entity or relationship, while the same changes in a different entity or relationship may be irrelevant. As a result, the number of unnecessary versions stored in the activity graph may be reduced, thereby decreasing the storage space used by the system.

Data Management

As mentioned above, elements, such as nodes, edges, and data associated with nodes and edges, may include time periods indicating when the elements are valid. For example, a first version of a document may have been created on Jan. 1, 2013, and a second version of the document may have been created on Jan. 10, 2013. Thus, the first version may include information indicating that it is valid from Jan. 1, 2013-Jan. 10, 2013, while the second version of the document may include information indicating that is valid from Jan. 10, 2013-present. Thus, the second version of the document may be valid, but the first version is expired or not valid. While no longer valid, a user may still want to retain the first version as a point of reference or may later need that version to revert back to. Thus, it may be desirable to manage the activity graph using data removal policies that define when and how elements are deleted or removed from the system.

In some examples, the data removal policies may be individually configured for each declared collection of entities or relationships. A data retention type annotation may be selected for each entity or relationship and may be used to define when entities or relationships should be removed from the system in response to events occurring within the activity graph. A data decay annotation may be selected for each entity or relationship and may be used to define when entities or relationships should be removed from the system based on elapsed time. In this way, a user or administrator may specifically define when and how entities or relationships should be removed or deleted from the system. Moreover, these removal policies may be independent of the physical medium on which the data is stored. For example, the deletion of data may be independent of a partition within the database on which it is stored.

Data Retention

A data retention type annotation may be selected for each entity or relationship and may be used to define when entities or relationships should be removed from the system in response to events occurring within the activity graph. The data retention types may include entity level, version level, and relationship level, and may generally define the conditions required to remove/delete an entity or relationship.

The entity level retention type annotation may indicate that data retention is based on the lifetime of the entity. In other words, once the entity expires as defined by its valid time duration, it is to be removed from the system (e.g., by removing the nodes from the activity graph). For example, continuing with the document example above, the first version of the document was replaced with a second version on Jan. 10, 2013. If the entity level retention type was selected for this document, the node associated with the first version may be removed from the activity graph as the entity (first version of the document) expired on Jan. 10, 2013. However, the second version of the document may be maintained since the time duration of Jan. 10, 2013-present indicates that the entity is still valid. This retention type may be selected, for example, to maintain only the most recent version of an entity. In some examples, a user may select a policy that indicates whether or not active relationships to other entities in the activity graph are to be removed when removing an entity (e.g., by removing the edges from the activity graph). By default, a policy indicating that relationships are not deleted and that only the generic node is maintained (but all its versions are removed) may be selected. The generic entity node is a place holder that is removed once its last relationship is removed (e.g., via a garbage collection process).

The version level retention type annotation may indicate that data retention is based on expiration of the versions associated with the entity. That is, the entity may expire once all of its versions expire. Once there are no valid versions for an entity, the entity may be removed (e.g., by removing all nodes associated with the entity). For example, using the same document example provided above, the first version of the document may have expired on Jan. 10, 2013. However, a second version of the document was generated and is presently still valid. As such, if the version level retention type was selected for this entity, both the first version and second version of the document may be maintained in the system since a valid version exists. If, however, the second version of the document is flagged for deletion, then all versions of the entity will have expired and both versions may be deleted. This retention type may be selected, for example, to maintain only entities having at least one valid version. In some examples, as discussed above, a user may select a policy that indicates whether or not active relationships to other entities in the activity graph are to be removed when removing an entity (e.g., by removing the edges from the activity graph). By default, a policy indicating that relationships are not deleted and that only the generic node is maintained (but all its versions are removed) may be selected.

The relationship level retention type annotation may indicate that the expiration of an entity is based on its relationships. That is, an entity expires when all of its relationships expire. For example, using the same document example provided above, the second version of the document may include a single relationship to a project entity, indicating that the document is required by the project. The relationship may include a time period indicating that the relationship is currently valid (e.g., that the document is currently required by the project). Thus, if the relationship level retention type was selected for this entity, the second version of the document may be maintained since it includes a valid relationship. If, however, the second version of the document is replaced with a different document, the time period of the relationship between the second version of the document and the project may indicate that the relationship is no longer valid. As a result, the second version of the document may be deleted since it no longer includes any valid relationships (assuming there are no other valid relationships to other entities). In other examples, the expiration of a relationship may be explicitly defined independent of its participating entities (e.g., dependent on the end of the time period or a function of the length of the time period). This retention type may be selected to ensure that the activity graph does not include disconnected entities. This may prevent, for example, retention of entity information of entities that are unrelated to any other entity in the activity graph (e.g., a document that is not required or being used by any user). In some examples, as discussed above, a user may select a policy that indicates whether or not active relationships to other entities in the activity graph are to be removed when removing an entity (e.g., by removing the edges from the activity graph). By default, a policy indicating that relationships are not deleted and that only the generic node is maintained (but all its versions are removed) may be selected.

In some examples, a completely disconnected entity may not be automatically removed since even without existing valid relationships, its existence, relevant time period, and even its lack of relationships may be of interest.

In some examples, in addition to the retention type annotation, a retention period (e.g., configurable value representing the size of time to use, such as a millisecond, hour, day, week, month, quarter, year, etc.) may also be selected for an entity. In these examples, the retention period may override the annotation.

In order to efficiently manage data retention, in some examples, physical clustering of the underlying store of the activity graph may be used. This may include physically clustering nodes and edges that are to be removed within the same period in a manner similar to partitioning in a relational database. However, instead of clustering based solely on the time that the data was entered into the system, nodes and edges may be clustered based on expected deletion time as predicted using the data retention types. For example, nodes and edges that are expected to be removed at the same time may be stored near to each other on the physical storage medium of the system. Physically clustering data in this way enables the truncation of a partition in a single atomic operation, independent of the number of nodes and edges.

Data Decay

The second type of annotation that may be used to define the system's data removal policy is the data decay annotation. This annotation may be selected for each entity or relationship and may enable the system to purge versions of an entity or relationship based on elapsed time. Similarly, attributes, information, and the like associated with entities or relationships may also be deleted using data decay.

In some examples, data decay may remove an entity, relationship, or associated information based on the duration that the entity, relationship, or associated information was valid. For instance, if a document was valid for only a short period of time, the document may be removed more quickly after it is no longer valid than a document that was valid for a long period of time. Thus, the shorter an entity, relationship, or associated information is valid in the system, the more quickly it expires. Additionally, the longer an entity, relationship, or associated information is invalid, the less likely it is to be retained.

In some examples, data decay is computed by a periodic process. The frequency at which the computation is performed is configurable (e.g., configure the period between computations) as well as the difference between the last time the state of an entity, attribute, or relationship was valid (e.g., as defined by the time indicating the period that the entity, attribute, or relationship is valid) and the current time (i.e., the time at which the retention process ran). Since each entity, attribute, or relationship may include a time period identifying the times the entity, attribute, or relationship is valid, data decay may be indicated by the beginning and end of the time period as well as the difference between the time period and the current time. For example, the period at which the data decay is computed may be configured to be one day, while the required length of time since the entity, attribute, or relationship was valid is one week. Thus, each day, the system may check the entity, relationship, or associated information to determine if the entity, relationship, or associated information has been invalid for more than 7 days. If, when the data decay computation is performed, the entity, relationship, or associated information has been invalid for more than 7 days, then the entity, relationship, or associated information may be deleted from the system.

Summarization

In some examples, a summarization annotation may be selected for each entity or relationship. A selection of the summarization annotation may cause the content of multiple versions to be combined into a single unit, thereby preserving at least some of the historical data or, in some cases, all of the historical data. In this way, detailed changes can be replaced with summaries of these changes. The result of the summarization process when applied to multiple versions, each having an associated time period, is an aggregated set of versions with associated time periods. The entities, attributes, or relationships to be summarized may be summarized in response to two or more entities, attributes, or relationships expiring, a threshold length of time after expiring, or the like. In this way, a user or administrator may determine the level of detail retained for each item stored in the system.

In some examples, the summarization of relationships can be based on homogeneous relationships (e.g., a single relationship over time). Since each relationship edge has a time period, the collection of changes to the same relationship over time may summarized by replacing a set of compatible edges between any two nodes with a single edge summarizing these edges. Summarizing relationships in this way allows the system to consolidate several relationships of the same type into one. For example, multiple working relationships between two persons may be summarized as one working relationship over a longer period with the percentages of time associated with specific types of working relationships as an additional attribute. For example, given a set of “work with” relationships representing different working relationships between two entities, John and Mike, as they held different roles (jobs) over the previous two years, the summarization process may replace the set of “work with” relationships with a single “work with” relationship edge that summarizes this set of “work with” relationships using attributes indicating the length of time that each relationship existed.

Data Management Process

FIG. 4 illustrates an exemplary process 400 for managing data in a data warehouse using an activity graph. At block 401, an activity graph may be accessed. The activity graph (e.g., activity graph 100 or 300) may include nodes (e.g., nodes 101) associated with entities connected together by edges (e.g., edges 103) representing relationships between the entities. The activity graph may be accessed by a processor from a local or remote database and may be used to store various types of data, such as users, contents, actions, entities, their associated relationships, their properties, versions thereof, and the like.

At block 403, a new version of an entity or relationship of the activity graph may be generated and stored based on a change in an attribute of the entity or relationship and a tracking type of the entity or relationship. In some examples, storing a new version of an entity may include generating another node in the activity graph representing the new version of the entity. In other examples, storing a new version of a relationship may include generating another edge in the activity graph representing the new version of the relationship. Whether or not a new version of the entity or relationship is generated in response to the change in an associated attribute may be based on a tracking annotation that was selected for that entity or relationship. For example, as described above, an entity or relationship may include a tracking annotation (e.g., no tracking, track all, or track selective annotation) indicating which attributes, if any, may trigger the creation of a new version.

At block 405, a node associated with an entity or an edge associated with a relationship may be removed from the activity graph based on a data retention rule (e.g., data retention annotation) associated with the entity. The entity may be the same or a different entity than that stored at block 403. The removal condition for a particular entity may be defined by the data retention type (e.g. entity level retention, version level retention, or relationship level retention) selected for that entity. For example, the removal condition may include an expiration of a valid period for the entity for entity level retention, expiration of all versions of an entity for version level retention, or expiration of all relationships for relationship level retention. In response to an occurrence of the removal condition specified by the data retention rule for the entity, the entity may be removed from the activity graph. In some examples, depending on a relationship removal policy, as discussed above, relationships associated with removed nodes may or may not be removed from the activity graph.

At block 407, a node associated with an entity or an edge associated with a relationship may be removed from the activity graph based on a data decay rule (e.g., data decay annotation) associated with the entity or relationship. The entity or relationship may be the same or a different entity or relationship than those discussed above with respect to blocks 403 and 405. In some examples, the data decay rule may specify a threshold length of time for the entity or relationship and may be based on a duration that the entity or relationship was valid. For example, if an entity or relationship was valid for only a short period of time, the threshold length of time may be relatively short. If, however, the entity or relationship was valid for a long period of time, the threshold length of time may instead by relatively long. The actual length of time for the threshold length of time may be configured based on user or administrator preference. In some examples, in response to the duration that the entity or relationship was invalid or expired exceeding the threshold length of time, the entity or relationship may be removed from the activity graph. This has the effect of removing entities or relationships that were valid for a short amount of time more quickly after they are no longer valid than entities or relationships that were valid for a long period of time. Thus, the shorter an entity, relationship, or associated information is valid in the system, the more quickly it expires. Additionally, the longer an entity, relationship, or associated information is invalid, the less likely it is to be retained.

At block 409, expired versions of an entity or expired versions of a relationship may be summarized in response to two or more entities, attributes, or relationships expiring, being expired a threshold length of time, or the like. The entity or relationship may be the same or a different entity or relationship than those discussed above with respect to blocks 403, 405, and 407. Whether or not versions of the entity or relationship are summarized may be based on a summarization annotation that was selected for that entity or relationship. A selection of the summarization annotation may cause the content of multiple versions to be combined into a single unit, thereby preserving at least some of the historical data. In this way, detailed changes can be replaced with summaries of these changes. The result of the summarization process when applied to multiple versions, each having an associated time period, is an aggregated set of versions with associated time periods.

While blocks of process 400 are shown and described in a particular order, it should be appreciated that the blocks may be performed in any order and not all blocks need be performed. For example, blocks 403, 405, 407, and 409 may be performed based on an order of the events that trigger the execution of these blocks.

Computing System

FIG. 5 depicts computing system 500 with a number of components that may be used to perform the above-described processes. The main system 502 includes a motherboard 504 having an input/output (“I/O”) section 506, one or more central processing units (“CPU”) 508, and a memory section 510, which may have a flash memory card 512 related to it. The I/O section 506 is connected to a display 524, a keyboard 514, a disk storage unit 516, and a media drive unit 518. The media drive unit 518 can read/write a non-transitory computer-readable storage medium 520, which can contain programs 522 and/or data.

At least some values based on the results of the above-described processes can be saved for subsequent use. Additionally, a non-transitory computer-readable medium can be used to store (e.g., tangibly embody) one or more computer programs for performing any one of the above-described processes by means of a computer. The computer program may be written, for example, in a general-purpose programming language (e.g., Pascal, C, C++, Java) or some specialized application-specific language.

Although only certain exemplary embodiments have been described in detail above, those skilled in the art will readily appreciate that many modifications are possible in the exemplary embodiments without materially departing from the novel teachings and advantages of the present disclosure. For example, aspects of embodiments disclosed above can be combined in other combinations to form additional embodiments. Accordingly, all such modifications are intended to be included within the scope of the present disclosure. 

What is claimed is:
 1. A computer-implemented method for managing data in a data warehouse using an activity graph, the method comprising: accessing an activity graph comprising a plurality of interconnected nodes, wherein the plurality of interconnected nodes represent a plurality of entities; storing a new version of a first entity of the plurality of entities in the activity graph based on a change in an attribute of the first entity and a tracking type associated with the first entity; removing a second entity of the plurality of entities from the activity graph based on a data retention rule associated with the second entity; and removing a third entity of the plurality of entities from the activity graph based on an elapsed length of time and a data decay rule associated with the third entity.
 2. The computer-implemented method of claim 1, wherein the activity graph further comprises a plurality of edges representing a plurality of relationships between the plurality of entities represented by the plurality of interconnected nodes, and wherein the method further comprises: storing a new version of a first relationship of the plurality of relationships in the activity graph based on a change in an attribute of the first relationship and a tracking type associated with the first relationship; removing a second relationship of the plurality of relationships from the activity graph based on a data retention rule associated with a node connected to an edge representing the second relationship; and removing a third relationship of the plurality of relationships from the activity graph based on an elapsed length of time and a data decay rule associated with the third relationship.
 3. The computer-implemented method of claim 1, wherein two or more nodes of the plurality of nodes represent different versions of a fourth entity.
 4. The computer-implemented method of claim 3, further comprising: summarizing the different versions of the fourth entity by merging the two or more nodes into a single node.
 5. The computer-implemented method of claim 1, wherein the tracking type associated with the first entity identifies a type of attribute that causes the storing of the new version of the first entity in the activity graph, and wherein storing the new version of the first entity in the activity graph based on the change in the attribute of the entity and the tracking type associated with the first entity comprises: inserting a new node representing the new version of the first entity into the activity graph if a type of the attribute is the type of attribute that causes the storing of the new version of the first entity in the activity graph.
 6. The computer-implemented method of claim 1, wherein the data retention rule identifies a data removal condition comprising an expiration of the second entity, an expiration of all versions of the second entity, or an expiration of all edges of the second entity, and wherein removing the second entity from the activity graph based on the data retention rule associated with the second entity comprises: removing a node associated with the second entity from the activity graph in response to the occurrence of the data removal condition.
 7. The computer-implemented method of claim 1, wherein the data decay rule comprises a threshold duration associated with the third entity, and wherein removing the third entity from the activity graph based on the data decay rule associated with the third entity comprises: removing a node associated with the third entity from the activity graph in response to an elapsed length of time exceeding the threshold duration, wherein the elapsed length of time represents a duration that the third entity has been expired.
 8. A non-transitory computer-readable storage medium comprising computer-executable instructions for managing data in a data warehouse using an activity graph, the computer-executable instructions comprising instructions for: accessing an activity graph comprising a plurality of interconnected nodes, wherein the plurality of interconnected nodes represent a plurality of entities; storing a new version of a first entity of the plurality of entities in the activity graph based on a change in an attribute of the first entity and a tracking type associated with the first entity; removing a second entity of the plurality of entities from the activity graph based on a data retention rule associated with the second entity; and removing a third entity of the plurality of entities from the activity graph based on an elapsed length of time and a data decay rule associated with the third entity.
 9. The non-transitory computer-readable storage medium of claim 8, wherein the activity graph further comprises a plurality of edges representing a plurality of relationships between the plurality of entities represented by the plurality of interconnected nodes, and wherein the computer-executable instructions further comprise instructions for: storing a new version of a first relationship of the plurality of relationships in the activity graph based on a change in an attribute of the first relationship and a tracking type associated with the first relationship; removing a second relationship of the plurality of relationships from the activity graph based on a data retention rule associated with a node connected to an edge representing the second relationship; and removing a third relationship of the plurality of relationships from the activity graph based on an elapsed length of time and a data decay rule associated with the third relationship.
 10. The non-transitory computer-readable storage medium of claim 8, wherein two or more nodes of the plurality of nodes represent different versions of a fourth entity.
 11. The non-transitory computer-readable storage medium of claim 10, further comprising instructions for: summarizing the different versions of the fourth entity by merging the two or more nodes into a single node.
 12. The non-transitory computer-readable storage medium of claim 8, wherein the tracking type associated with the first entity identifies a type of attribute that causes the storing of the new version of the first entity in the activity graph, and wherein storing the new version of the first entity in the activity graph based on the change in the attribute of the entity and the tracking type associated with the first entity comprises: inserting a new node representing the new version of the first entity into the activity graph if a type of the attribute is the type of attribute that causes the storing of the new version of the first entity in the activity graph.
 13. The non-transitory computer-readable storage medium of claim 8, wherein the data retention rule identifies a data removal condition comprising an expiration of the second entity, an expiration of all versions of the second entity, or an expiration of all edges of the second entity, and wherein removing the second entity from the activity graph based on the data retention rule associated with the second entity comprises: removing a node associated with the second entity from the activity graph in response to the occurrence of the data removal condition.
 14. The non-transitory computer-readable storage medium of claim 8, wherein the data decay rule comprises a threshold duration associated with the third entity, and wherein removing the third entity from the activity graph based on the data decay rule associated with the third entity comprises: removing a node associated with the third entity from the activity graph in response to an elapsed length of time exceeding the threshold duration, wherein the elapsed length of time represents a duration that the third entity has been expired.
 15. An apparatus for managing data in a data warehouse using an activity graph, the apparatus comprising: a memory comprising an activity graph; and a processor configured to: access the activity graph from the memory, the activity graph comprising a plurality of interconnected nodes, wherein the plurality of interconnected nodes represent a plurality of entities; store a new version of a first entity of the plurality of entities in the activity graph based on a change in an attribute of the first entity and a tracking type associated with the first entity; remove a second entity of the plurality of entities from the activity graph based on a data retention rule associated with the second entity; and remove a third entity of the plurality of entities from the activity graph based on an elapsed length of time and a data decay rule associated with the third entity.
 16. The apparatus of claim 15, wherein the activity graph further comprises a plurality of edges representing a plurality of relationships between the plurality of entities represented by the plurality of interconnected nodes, and wherein the processor is further configured to: store a new version of a first relationship of the plurality of relationships in the activity graph based on a change in an attribute of the first relationship and a tracking type associated with the first relationship; remove a second relationship of the plurality of relationships from the activity graph based on a data retention rule associated with a node connected to an edge representing the second relationship; and remove a third relationship of the plurality of relationships from the activity graph based on an elapsed length of time and a data decay rule associated with the third relationship.
 17. The apparatus of claim 15, wherein two or more nodes of the plurality of nodes represent different versions of a fourth entity, and wherein the processor is further configured to: summarize the different versions of the fourth entity by merging the two or more nodes into a single node.
 18. The apparatus of claim 15, wherein the tracking type associated with the first entity identifies a type of attribute that causes the storing of the new version of the first entity in the activity graph, and wherein storing the new version of the first entity in the activity graph based on the change in the attribute of the entity and the tracking type associated with the first entity comprises: inserting a new node representing the new version of the first entity into the activity graph if a type of the attribute is the type of attribute that causes the storing of the new version of the first entity in the activity graph.
 19. The apparatus of claim 15, wherein the data retention rule identifies a data removal condition comprising an expiration of the second entity, an expiration of all versions of the second entity, or an expiration of all edges of the second entity, and wherein removing the second entity from the activity graph based on the data retention rule associated with the second entity comprises: removing a node associated with the second entity from the activity graph in response to the occurrence of the data removal condition.
 20. The apparatus of claim 15, wherein the data decay rule comprises a threshold duration associated with the third entity, and wherein removing the third entity from the activity graph based on the data decay rule associated with the third entity comprises: removing a node associated with the third entity from the activity graph in response to an elapsed length of time exceeding the threshold duration, wherein the elapsed length of time represents a duration that the third entity has been expired. 